<script setup lang='ts'>
import emitter from '../utils/bus.ts'
const msg = '一包辣条'

function msgClick() {
    // 触发事件
    emitter.emit('sendMsg',msg)
}
</script>
<template>
    <div >
        <h1>Com1 -- {{msg}} </h1>
        <button @click='msgClick'>点击给兄弟分辣条</button>
    </div>
</template>
<style>
    
</style>